

 <?php
 	header("Content-type:text/html;charset=utf-8");
 	$name = $_POST["userName"];
 	$password = $_POST["pwd"];
 	$conn = mysql_connect("localhost","root","root");
 	mysql_select_db('feiyadi');
 	$result = mysql_query("select * from yonghu where username = '$name' and userpassword = $password",$conn);
 	
 	if(mysql_num_rows($result) == 1){
 		echo 1;
 	}else{
 		echo 2;
 		
 	}
	
	
	// mysql_free_result($result);
	mysql_close($conn);

 ?>